Optimal. Leaf size=209 \[ -\frac {31 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{128 d}-\frac {31 a \cot (c+d x)}{128 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc (c+d x)}{192 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc ^2(c+d x)}{240 d \sqrt {a+a \sin (c+d x)}}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{40 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)}}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.44, antiderivative size = 209, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {2960, 2851,
2852, 212, 3123, 3059} \begin {gather*} -\frac {31 a \cot (c+d x)}{128 d \sqrt {a \sin (c+d x)+a}}-\frac {31 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a \sin (c+d x)+a}}\right )}{128 d}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a \sin (c+d x)+a}}{5 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{40 d \sqrt {a \sin (c+d x)+a}}+\frac {97 a \cot (c+d x) \csc ^2(c+d x)}{240 d \sqrt {a \sin (c+d x)+a}}+\frac {97 a \cot (c+d x) \csc (c+d x)}{192 d \sqrt {a \sin (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2851
Rule 2852
Rule 2960
Rule 3059
Rule 3123
Rubi steps
\begin {align*} \int \cot ^4(c+d x) \csc ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx &=\int \csc ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx+\int \csc ^6(c+d x) \sqrt {a+a \sin (c+d x)} \left (1-2 \sin ^2(c+d x)\right ) \, dx\\ &=-\frac {a \cot (c+d x)}{d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)}}{5 d}+\frac {1}{2} \int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx+\frac {\int \csc ^5(c+d x) \left (\frac {a}{2}-\frac {13}{2} a \sin (c+d x)\right ) \sqrt {a+a \sin (c+d x)} \, dx}{5 a}\\ &=-\frac {a \cot (c+d x)}{d \sqrt {a+a \sin (c+d x)}}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{40 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)}}{5 d}-\frac {97}{80} \int \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)} \, dx-\frac {a \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}\\ &=-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}-\frac {a \cot (c+d x)}{d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc ^2(c+d x)}{240 d \sqrt {a+a \sin (c+d x)}}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{40 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)}}{5 d}-\frac {97}{96} \int \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)} \, dx\\ &=-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}-\frac {a \cot (c+d x)}{d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc (c+d x)}{192 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc ^2(c+d x)}{240 d \sqrt {a+a \sin (c+d x)}}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{40 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)}}{5 d}-\frac {97}{128} \int \csc ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx\\ &=-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}-\frac {31 a \cot (c+d x)}{128 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc (c+d x)}{192 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc ^2(c+d x)}{240 d \sqrt {a+a \sin (c+d x)}}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{40 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)}}{5 d}-\frac {97}{256} \int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx\\ &=-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}-\frac {31 a \cot (c+d x)}{128 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc (c+d x)}{192 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc ^2(c+d x)}{240 d \sqrt {a+a \sin (c+d x)}}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{40 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)}}{5 d}+\frac {(97 a) \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{128 d}\\ &=-\frac {31 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{128 d}-\frac {31 a \cot (c+d x)}{128 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc (c+d x)}{192 d \sqrt {a+a \sin (c+d x)}}+\frac {97 a \cot (c+d x) \csc ^2(c+d x)}{240 d \sqrt {a+a \sin (c+d x)}}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{40 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)}}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.24, size = 403, normalized size = 1.93 \begin {gather*} -\frac {\csc ^{16}\left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sin (c+d x))} \left (10180 \cos \left (\frac {1}{2} (c+d x)\right )-2240 \cos \left (\frac {3}{2} (c+d x)\right )-1392 \cos \left (\frac {5}{2} (c+d x)\right )+4810 \cos \left (\frac {7}{2} (c+d x)\right )+930 \cos \left (\frac {9}{2} (c+d x)\right )-10180 \sin \left (\frac {1}{2} (c+d x)\right )+4650 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)-4650 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)-2240 \sin \left (\frac {3}{2} (c+d x)\right )+1392 \sin \left (\frac {5}{2} (c+d x)\right )-2325 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (3 (c+d x))+2325 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (3 (c+d x))+4810 \sin \left (\frac {7}{2} (c+d x)\right )-930 \sin \left (\frac {9}{2} (c+d x)\right )+465 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (5 (c+d x))-465 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (5 (c+d x))\right )}{1920 d \left (1+\cot \left (\frac {1}{2} (c+d x)\right )\right ) \left (\csc ^2\left (\frac {1}{4} (c+d x)\right )-\sec ^2\left (\frac {1}{4} (c+d x)\right )\right )^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 6.33, size = 180, normalized size = 0.86
method | result | size |
default | \(-\frac {\left (1+\sin \left (d x +c \right )\right ) \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \left (465 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {9}{2}} a^{\frac {3}{2}}+465 \arctanh \left (\frac {\sqrt {-a \left (\sin \left (d x +c \right )-1\right )}}{\sqrt {a}}\right ) a^{6} \left (\sin ^{5}\left (d x +c \right )\right )-890 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {7}{2}} a^{\frac {5}{2}}-896 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {5}{2}} a^{\frac {7}{2}}+2170 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {3}{2}} a^{\frac {9}{2}}-465 \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, a^{\frac {11}{2}}\right )}{1920 a^{\frac {11}{2}} \sin \left (d x +c \right )^{5} \cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d}\) | \(180\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 461 vs.
\(2 (181) = 362\).
time = 0.38, size = 461, normalized size = 2.21 \begin {gather*} \frac {465 \, {\left (\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right )^{5} + \cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{3} - 2 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right ) - 1\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right ) - 3\right )} \sqrt {a \sin \left (d x + c\right ) + a} \sqrt {a} - 9 \, a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) - a\right )} \sin \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1}\right ) + 4 \, {\left (465 \, \cos \left (d x + c\right )^{5} + 1435 \, \cos \left (d x + c\right )^{4} - 154 \, \cos \left (d x + c\right )^{3} - 1662 \, \cos \left (d x + c\right )^{2} - {\left (465 \, \cos \left (d x + c\right )^{4} - 970 \, \cos \left (d x + c\right )^{3} - 1124 \, \cos \left (d x + c\right )^{2} + 538 \, \cos \left (d x + c\right ) + 611\right )} \sin \left (d x + c\right ) + 73 \, \cos \left (d x + c\right ) + 611\right )} \sqrt {a \sin \left (d x + c\right ) + a}}{7680 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - {\left (d \cos \left (d x + c\right )^{5} + d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{3} - 2 \, d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right ) + d\right )} \sin \left (d x + c\right ) - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 242, normalized size = 1.16 \begin {gather*} -\frac {\sqrt {2} {\left (465 \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + \frac {4 \, {\left (7440 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 7120 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 3584 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4340 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 465 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (2 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}\right )} \sqrt {a}}{7680 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^4\,\sqrt {a+a\,\sin \left (c+d\,x\right )}}{{\sin \left (c+d\,x\right )}^6} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________